package com.lanxiao.cloud.common.core.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @author ：qiaoliang
 * @date ：2021-08-19
 */
@ApiModel("分页查询请求模型")
public class PageQuery implements Serializable {
  @ApiModelProperty(value = "页大小", required = true)
  private final Integer size;
  @ApiModelProperty(value = "当前页", required = true)
  private final Integer page;
  @ApiModelProperty(value = "首次查询时间")
  private final Date time;

  public PageQuery(Integer size, Integer page, Date time) {
    this.size = Objects.nonNull(size)?size:10;
    this.page = Objects.nonNull(page)?page:1;
    this.time = time;
  }

  public Integer getSize() {
    return size;
  }

  public Integer getPage() {
    return page;
  }

  public Date getTime() {
    return time;
  }
}
